One type of conventional image-recording device referred to as a serial printer is an inkjet printer. This type of inkjet printer includes a recording head having actuators configured of piezoelectric elements or electrostrictive elements that bend in response to an inputted signal, or heating elements that locally boil the ink to generate pressure. The recording head supplies ink to the actuators, which apply pressure to the ink based on an inputted signal for ejecting ink droplets. The inkjet printer also includes a carriage on which the recording head is supported for reciprocating in a direction orthogonal to the conveying direction of a recording paper. The carriage is scanned once each time the recording paper is conveyed a prescribed line feed amount, during which time the recording head ejects ink droplets based on inputted signals to record an image on the recording paper.
This type of inkjet printer detects edges of the recording paper in order to align the image accurately with respect to the recording paper. It is important that these inkjet printers detect both width edges of the recording paper accurately, particularly when performing edge-to-edge borderless printing.
One such method for detecting the edges of the recording paper is disclosed in Japanese unexamined patent application publication No. 2004-182361. This inkjet printer has a carriage, and an optical sensor mounted on the carriage. The optical sensor includes a light-emitting element for irradiating light onto the recording paper, and a light-receiving element for receiving light reflected off the recording paper. The light-emitting element irradiates light onto the recording paper as the carriage moves in a scanning motion so that the optical sensor can detect the presence of the recording paper based on the amount of reflected light received by the light-receiving element.